<template>
	<div class="container">
		<navigationBar leftTitle="我发布的"></navigationBar>
		<div class="content" :style="'padding-top: ' + (navigationBarHeight) + 'px;'">

			<div class="buy" v-for="(item,index) in list" :key="index">
				<div class="buy-left" @click.stop="toProduct(item.id)">
					<!-- 视频 -->
					<image
						v-if="item.firstFileSuffix !== 'png' && item.firstFileSuffix !== 'jpg' && item.firstFileSuffix !== 'jpge'"
						:src="item.firstCoverPath" class="buy-pic" mode="aspectFill" />
					<image v-else :src="item.firstPicturePath" class="buy-pic" mode="aspectFill" />
					<div class="pri-wrap">
						<span class="pri-title">{{item.title}}</span>
						<div class="pri-box">
							<span v-if="item.price" class="price"><span class="price-icon">￥</span>{{item.price}}</span>
							<span class="attr" v-if="item.freeShipping">包邮</span>
						</div>

					</div>
				</div>
				<div class="buy-want" @click.stop="toEdit(item.id)">编辑</div>
			</div>
			<div class="more">没有更多了～</div>
			<!-- <div class="empty" v-show="false">
				<image class="empty-img" src="../../static/icon/icon_wu.png" mode=""></image>
				<div class="title">暂无内容！</div>
			</div> -->
		</div>
	</div>
</template>

<script>
	import data from '@/js/my/mySend/data.js';
	import methods from '@/js/my/mySend/methods.js';
	import {
		mapState
	} from 'vuex';
	import navigationBar from '../../components/navigationBar.vue';
	export default {
		data,
		methods,
		onLoad(e) {
			this.getPageList()
		},
		onShow() {

		},
		onReachBottom() {
			this.getPageList()
		},
		onHide() {
			console.log('on hide')
		},
		onUnload() {},
		computed: {
			...mapState(['navigationBarHeight', 'statusBarHeight', 'userInfo']),
			bgHeight() {
				// #ifdef APP-PLUS
				return 250
				// #endif
				return this.navigationBarHeight + uni.upx2px(364);
			}
		},
		components: {
			navigationBar,
		}
	};
</script>
<style>
	page,
	uni-page {
		background-color: rgb(255, 255, 255) !important;
	}
</style>
<style scoped lang="scss">
	@import '~@/style/my/mySend.scss';
</style>